home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-197 win comm pro 10 / 2_scp.img / CIS.C_ / CIS.bin
Encoding:
Text File  |  1993-11-12  |  1.8 KB  |  61 lines

  1. /* This program cis.c created by Delrina and assigned to the compuserve session */
  2. /* runs an automated logon script for connecting to Compuserve.                   */
  3.  
  4. /*    $Revision:   1.0  $  */
  5. /*    $Date:   26 Apr 1993 15:20:36  $  */
  6.  
  7. /* Define main function, which is always the starting point of C programs. */
  8. /* (The term "void" indicates that the function returns no value.) */
  9. void main()
  10.     {
  11.     /* Declare variables */
  12.     long ScriptHandle;
  13.     int ReturnValue;
  14.     char Buffer[128];
  15.  
  16.     /* Initialize variables */
  17.     ReturnValue = 0;
  18.     ScriptHandle = 0;
  19.  
  20.     /* Establish a link between this script program and Delrina WinComm PRO */
  21.     ScriptHandle = dcInitialize(0,0,0,0);
  22.  
  23.     /* Exit if intialization of link with Delrina WinComm PRO failed */
  24.     if (ScriptHandle == 0) exit();
  25.  
  26.     /* Pause */
  27.     dcSleep(ScriptHandle, 1000L);
  28.  
  29.     /* Type a Ctrl-C */
  30.     ReturnValue = dcTypeText(ScriptHandle, 0, "\c");
  31.  
  32.     /* Wait for a prompt */
  33.     if (ReturnValue >= 0)
  34.         ReturnValue = dcWaitForPrompt(ScriptHandle, 1, "ser ID: ", 300L, 32000L);
  35.  
  36.     /* Get User ID value from Runtime Values dialog box */
  37.     if (ReturnValue >= 0)
  38.         ReturnValue = dcGetRuntimeValue(ScriptHandle, 2, 1, 128, Buffer);
  39.  
  40.     /* Type the value */
  41.     if (ReturnValue >= 0)
  42.         ReturnValue = dcTypeText(ScriptHandle, 0, Buffer);
  43.  
  44.     /* Wait for a prompt */
  45.     if (ReturnValue >= 0)
  46.         ReturnValue = dcWaitForPrompt(ScriptHandle, 1, "ssword: ", 300L, 32000L);
  47.  
  48.     /* Get Password value from Runtime Values dialog box */
  49.     if (ReturnValue >= 0)
  50.         ReturnValue = dcGetRuntimeValue(ScriptHandle, 3, 1, 128, Buffer);
  51.  
  52.     /* Type the value */
  53.     if (ReturnValue >= 0)
  54.         ReturnValue = dcTypeText(ScriptHandle, 0, Buffer);
  55.  
  56.     /* Terminate link between Delrina WinComm PRO and script program */
  57.     dcTerminate(ScriptHandle, 0);
  58.     }
  59.  
  60.  
  61.